package com.wolfking.demo.aggregate;

import com.wolfking.aggregate.*;

/**
 * <p>
 *
 * @author 赵伟伟(wolfking)
 * created on 2019-10-17 20:37
 */
@ConcurrentAggregate(@AggregateThreadPool(name = "userInfo", rejectedHandler = "myRejectedExecutionHandler"))
public interface UserInfoAggregate {

    @AggregateProviders({
            @AggregateProvider(beanClass = UserService1.class, method = "getUserAge", parameters = @AggregateParameter("id")),
            @AggregateProvider(beanClass = AccountService.class, method = "getAccount", parameters = @AggregateParameter("id"))
    })
    @AggregateConsumer(beanClass = UserSummary.class, method = "summary")
    UserInfo getUserInfo(@AggregateParameterName("id") Integer id);
}
